<div class="layui-box layui-laypage layui-laypage-default">
    <span class="layui-laypage-count">共 {{ $paginator->total() }} 条</span>
    @if ($paginator->onFirstPage())
        <a href="javascript:;" class="layui-laypage-prev layui-disabled" data-page="0">上一页</a>
    @else
        <a href="{{ $paginator->previousPageUrl() }}" class="layui-laypage-next">上一页</a>
    @endif

    @foreach ($elements as $element)
        {{-- "Three Dots" Separator --}}
        @if (is_string($element))
            <span class="layui-laypage-spr layui-disabled">…</span>
        @endif

        {{-- Array Of Links --}}
        @if (is_array($element))
            @foreach ($element as $page => $url)
                @if ($page == $paginator->currentPage())
                    <span class="layui-laypage-curr"><em class="layui-laypage-em"></em><em>{{ $page }}</em></span>
                @else
                    <a href="{{ $url }}">{{ $page }}</a>
                @endif
            @endforeach
        @endif
    @endforeach

    {{-- Next Page Link --}}
    @if ($paginator->hasMorePages())
        <a href="{{ $paginator->nextPageUrl() }}" class="layui-laypage-next">下一页</a>
    @else
        <a href="javascript:;" class="layui-laypage-prev layui-disabled" data-page="0">下一页</a>
    @endif

    <span class="layui-laypage-limits layui-form" style="width: 95px;">
        <select class='_perPage' name='_per_page' lay-filter="changePerPage">
            <option value='' @if(!in_array($paginator->perPage(), $perPages)) selected @endif>其他</option>
            @foreach($perPages as $page)
                <option value="{{ $page }}" @if($paginator->perPage() == $page) selected @endif>{{ $page }} 条/页</option>
            @endforeach
        </select>
    </span>
    <span class='layui-laypage-skip'>到第
        <input name='_page' autocomplete='off' type='text' min='1' class='layui-input'>页
        <button type='button' class='layui-btn layui-btn-sm layui-btn-primary _goPage'>确定</button>
    </span>
</div>
